Fix: Make case-insensitive search for the usergroup and multi selection columns#2446
Fix: Make case-insensitive search for the usergroup and multi selection columns#2446Koc wants to merge 1 commit into
Conversation
a3b8def to
120718e
Compare
| } | ||
| }) | ||
| return ret | ||
| return ret.toLowerCase() |
There was a problem hiding this comment.
Is it intentional that the search is case insentive but the other filters aren't?
For the Is equal / Is not equal operators. The filter UI stores whatever casing the user typed, so a row containing Alice now becomes alice before comparison. That makes Is equal "Alice" fail and Is not equal "Alice" incorrectly pass?
There was a problem hiding this comment.
now I've replicated same logic that we have for text line. Everything is case insensitive. For a long term perspective maybe we can add some toggle related to sensitivity.
| [FilterIds.Contains]() { return valueString?.toLowerCase().includes(filterValue.toLowerCase()) }, | ||
| [FilterIds.DoesNotContain]() { return !valueString?.toLowerCase().includes(filterValue.toLowerCase()) }, |
There was a problem hiding this comment.
At https://github.com/nextcloud/tables/blob/main/src/shared/components/ncTable/partials/TableHeaderColumnOptions.vue#L315, there’s a small check meant to stop adding the same Contains or Does not contain filter twice. I think that conflicts with this?
120718e to
fe95c8c
Compare
92a4e42 to
c1e07dc
Compare
…on columns Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
c1e07dc to
b342f82
Compare
This is a follow-up for the #1798. It spreads same logic what we have in text line type to other column types. So, now everything is case insensitive.
It also fixes filters for usergroup single selection
🔘 Single selection
☑️ Multi selection
👤 User single selection
👥 User multi selection